package messages;


/**
 * InvalidUserDetailsRequestMessage
 * 
 * Message sent to the server when some player did an invalid user
 * details request.
 * This will happen when the user doesn't exist.
 */
public class InvalidUserDetailsRequestMessage extends Message {

	public enum ErrorCode { UnknownUser }
	
	public InvalidUserDetailsRequestMessage(ErrorCode errorCode, UserDetailsMessage originalMessage) {
		super();
	
		this.errorCode = errorCode;
		this.originalMessage = originalMessage;		
	}
			
	
	public ErrorCode getErrorCode() {
		return this.errorCode;
	}


	public UserDetailsMessage getOriginalMessage() {
		return this.originalMessage;
	}
	
	
	@Override
	public String toString() {
		return super.toString() + " " + errorCode.toString();
	}
	
	
	private ErrorCode errorCode;				// The error code that explains why request is invalid
	private UserDetailsMessage originalMessage;	// The original message sent by the player

	private static final long serialVersionUID = 1L;
}
